Skip to main content

Escrow

Query Messages

note

We will only go through the queries for this contract, as users are not allowed to execute any messages on the Escrow contract directly. You can read about the Escrow architecture here.

List of queries that can be performed on the Escrow contract.

Get State

Returns the internal configuration and current status of the escrow contract.

Query Call

function getState() external view returns (EscrowState memory);
{
  "get_state": {}
}

Response

struct EscrowState {
    string token_id;
    address factory;
    address owner;
    address token_manager;
}
FieldTypeDescription
token_idstringThe token this escrow contract is associated with.
factoryaddressThe address of the factory that created this escrow.
owneraddressThe current owner/admin of the escrow.
token_manageraddressAddress allowed to update or manage token settings.

Get Token ID

Returns the token ID associated with this escrow contract.

Query Call

function getTokenId() external view returns (string memory);
{
  "get_token_id": {}
}

Response

string token_id;
FieldTypeDescription
token_idstringThe token ID tied to this escrow contract.

Is Token Allowed

Checks whether a specific token type is allowed in this escrow.

Query Call

function isTokenAllowed(TokenType memory token_type) external view returns (bool);
{
  "is_token_allowed": {
    "token_type": {
      "native": {
        "denom": "usdc"
      }
    }
  }
}

Input Parameters

FieldTypeDescription
token_typeTokenTypeThe type of token to check (native or smart).

Response

bool is_allowed;
FieldTypeDescription
is_allowedboolTrue if the token is permitted by the escrow.

Get Allowed Denoms

Returns a list of all native token denominations allowed by this escrow.

Query Call

function getAllowedDenoms() external view returns (string[] memory);
{
  "get_allowed_denoms": {}
}

Response

string[] allowed_denoms;
FieldTypeDescription
allowed_denomsstring[]List of native denoms allowed in this escrow.